import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.FlowPane;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;

public class Test extends Application {
	public void start(Stage stage) {
		Label label1=new Label("First Name");
		TextField text1=new TextField();

		Label label2=new Label("Middle Name");
		TextField text2=new TextField();
		text2.setPrefColumnCount(8);

		Label label3=new Label("Last Name");
		TextField text3=new TextField();

		FlowPane pane=new FlowPane();
		pane.setHgap(20);
		pane.setVgap(10);
		//pane.setOrientation(Orientation.VERTICAL);
		pane.setAlignment(Pos.TOP_RIGHT);
		pane.getChildren().addAll(label1, text1, label2, text2, label3, text3);

		Scene scene=new Scene(pane,500,500);

		stage.setTitle("flowpane test");
		stage.setScene(scene);
		stage.show();
	}
}
